package Demo01.Person;

public class Test2 {
    public static void main(String[] args) {
        Student student = new Student();
        student.setName("s");
        student.setAge(21);
        System.out.println(student.getName());
        System.out.println(student.getAge());
        student.eat();
        student.sleep();
        student.sleep();
 
        Worker worker = new Worker();
        worker.setName("w");
        worker.setAge(24);
        System.out.println(worker.getName());
        System.out.println(worker.getAge());
        worker.eat();
        worker.sleep();
        worker.work();
    }
}